//--------------------------------------------------------------
//
// Qizhi Zhang 
// ezhung@gmail.com
// http://www.moorwind.com
//
//--------------------------------------------------------------
package reader.model
{
	import org.puremvc.as3.multicore.interfaces.IProxy;
	
	import reader.model.vo.UserVO;

	public interface IUserProxy extends IProxy
	{
		/**
		 * validate user by given username and password.
		*/
		function validate(username:String, password:String):void;
		
		/**
		 * register a new user.
		*/
		function register(user:UserVO):void;
		
		/**
		 * check if given username exit.
		*/
		function checkUserNameExit(username:String):void;
		
		/**
		 * change user's password.
		*/
		function updatePassword(username:String, password:String, oldpassword:String = "", isRegister:Boolean = false):void;
		
		/**
		 * update user preference setting.
		*/
		function updateUserSetting(user:UserVO):void;
		
		/**
		 * set label-source tree's display type.
		*/
		function updateUserIsDisplayOldLabels(user:UserVO):void;
		
		/**
		 * set if fetch only read blogs or not.
		*/
		function updateUserGetBlogType(user:UserVO):void;
		
		/**
		 * set if auto-save blog while writing.
		*/
		function updateAutoSaveType(user:UserVO):void;
		
		/**  
		 * delete given user.
		*/
		function deleteAccount():void;
	}
}